package main.Q2201_2300;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class Q2241_2250 {
    public static void main(String[] args) {
        System.out.println("Question2241：");
        System.out.println("Question2242：");
        System.out.println("Question2243：");
        System.out.println("Question2244：");
        System.out.println("Question2245：");
        System.out.println("Question2246：");
        System.out.println("Question2247：");
        System.out.println("Question2248：");
        System.out.println("Question2249：统计圆内格点数目");
        System.out.println("Question2250：");
    }
}

class Question2249 {
    public int countLatticePoints(int[][] circles) {
        Set<String> set = new HashSet<>();
        for (int[] circle : circles) {
            int x = circle[0], y = circle[1], r = circle[2];
            for (int i = x - r; i <= x + r; i++) {
                for (int j = y - r; j <= y + r; j++) {
                    double distance = Math.sqrt(Math.abs(x - i) * Math.abs(x - i) + Math.abs(y - j) * Math.abs(y - j));
                    if (distance - r <= 1e-5) {
                        set.add(i + "-" + j);
                    }
                }
            }
        }
        return set.size();
    }
}